/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : PCF85063.h
  * @brief          : Header for PCF85063.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) [2021] [Fudan Microelectronics]
  * THIS SOFTWARE is licensed under Mulan PSL v2.
  * can use this software according to the terms and conditions of the Mulan PSL v2.
  * You may obtain a copy of Mulan PSL v2 at:
  *          http://license.coscl.org.cn/MulanPSL2
  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 
  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 
  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  * See the Mulan PSL v2 for more details.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __PCF85063_H
#define __PCF85063_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

#include "fm33le0xx_fl_def.h"

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

typedef struct
{
	uint8_t sec;	/*!< sec data*/
	uint8_t min;	/*!< min data*/
	uint8_t hour;	/*!< hour data*/
	uint8_t days;	/*!< days data*/
	uint8_t w_days;	/*!< w_days data*/
	uint8_t month;	/*!< month data*/
	uint8_t year;	/*!< year data*/
} PCF85063_data;

#define PCF85063_DEBUG (1)

#define PCF85063_ADDRRES (0x51)
#define PCF85063_CTRL_1_REG (0x00)
#define PCF85063_CTRL_2_REG (0x01)
#define PCF85063_OFFEST_REG (0x02)
#define PCF85063_RAM_REG (0x03)
#define PCF85063_SEC_REG (0x04)
#define PCF85063_MIN_REG (0x05)
#define PCF85063_HOUR_REG (0x06)
#define PCF85063_DAYS_REG (0x07)
#define PCF85063_WEEKDAYS_REG (0x08)
#define PCF85063_MONTH_REG (0x09)
#define PCF85063_YEAR_REG (0x0A)

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/

void pcf85063_read_data(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __PCF85063_H */

/************************ (C) COPYRIGHT FMSH *****END OF FILE****/
